package ioperations;

import book.BookList;

import java.util.Scanner;

public class FindOPeration implements IOPeration{

    public void walk(BookList booklists){
        System.out.println("请输入你要查找的书的名字:");
        Scanner scanner=new Scanner(System.in);
        String name=scanner.nextLine();
        for (int i=0;i<booklists.getUsedSize();i++){
            if((booklists.books[i].name).equals(name)){
                System.out.println(booklists.books[i]);
                System.out.println("查找成功!!");
                return;
            }
        }
        System.out.println("您输入的图书名字错误,无法查找!!");

    }

}
